package vip.meet.type;

import java.util.HashMap;
import java.util.Map;

public enum EnableOrDisableStatus {

    ENABLE(1,"启用"),
    DISABLE(0,"停用");


    private Integer id;
    private String desc;
    
    private static final Map<Integer, EnableOrDisableStatus> idToEnum = new HashMap<Integer, EnableOrDisableStatus>();
    
    static {
        for (EnableOrDisableStatus op : values())
            idToEnum.put(op.id, op);
    }

    public static EnableOrDisableStatus getInstance(Integer id) {
        return idToEnum.get(id);
    }

    private EnableOrDisableStatus(Integer id, String desc){
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return desc;
    }
}
